﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace jmwqz
{
    public partial class set : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                txgzjf.Text = Maticsoft.Common.GlobalVar.Instance.GetAppConfig("gzjifen");
                txtjjf.Text = Maticsoft.Common.GlobalVar.Instance.GetAppConfig("tjjifen");
            }

        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                decimal tjjifen = Convert.ToDecimal(txtjjf.Text.Trim());
                decimal gzjifen = Convert.ToDecimal(txgzjf.Text.Trim());

                Maticsoft.Common.GlobalVar.Instance.SetAppConfig("tjjifen", tjjifen.ToString());
                Maticsoft.Common.GlobalVar.Instance.SetAppConfig("gzjifen", gzjifen.ToString());
            }
            catch (Exception ex)
            {
                JscriptMsg(ex.Message, "", "Fail");
            }

        }


        /// <summary>
        /// 添加编辑删除提示
        /// </summary>
        /// <param name="msgtitle">提示文字</param>
        /// <param name="url">返回地址</param>
        /// <param name="msgcss">CSS样式</param>
        protected void JscriptMsg(string msgtitle, string url, string msgcss)
        {
            string msbox = "parent.jsprint(\"" + msgtitle + "\", \"" + url + "\", \"" + msgcss + "\")";
            ClientScript.RegisterClientScriptBlock(Page.GetType(), "JsPrint", msbox, true);
        }
    }
}